/*
 * @Author: tkp
 * @Date: 2025-01-03 16:24:13
 */
import { authRoleAdd, authRoleQuery, authRoleModify, authRoleDel, authMenuStrategySave } from '@/utils/api'
export class IndexBloc {
    queryForm = {
        roleName: '',
        roleCode: '',
        enable: '',
    }
    addPop = false
    rowItem = ''
    editPop = false
    roleMenuPop = false
    enableList = [{ id: '0', label: '未启用' }, { id: '1', label: '已启用' }]
    tableOption = [
        { label: '角色名称	', prop: 'roleName', },
        { label: '角色编码', prop: 'roleCode', },
        { label: '是否启用', prop: 'enable', slot: 'enable' },
    ]
    tableData = []
    load(data) {
        authRoleQuery(data).then(res => {
            this.tableData = res.data
        })
    }
    modify(data) {
        return authRoleModify(data)
    }
    add(data) {
        return authRoleAdd(data)
    }
    del(data) {
        return authRoleDel(data)
    }
    saveMenuRole(data) {
        return authMenuStrategySave(data)
    }
}